package com.my.test.design.observer;

public class ObserverB extends Observer{

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }


    public void update(Observer obj, Subject sub){
        System.out.println("更新观察者:"+obj.getName()+sub.getState());
    }
}
